<text>The resources card maintains the external resource definitions of the stack.The system field names of the card correspond to the names of the resource files. The contents of the "Text" field can be used for defining specific resources.The definition syntax is: <res type>:<res name>,... <res type>:<res name>,...If the field is empty then all resources of the corresponding file are copied during the update operation. If only resource types are given then all resources of the that type are copied.The resource copy operation is activated by clicking at the "Update" button.</text>
<script>-- script "System resources"on updateSystemResourcessetErroranswer "Update the resources?" with "OK" or "Cancel"if it is not "OK" then exit updateSystemResourcesif the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"updateSystemResources","Missing field","",trueexit updateSystemResourcesend ifend ifsend "updateSysResources fldName" to the targetif error() thenfail 3,"updateSystemResources","Update failed","",trueexit updateSystemResourcesend ifend updateSystemResourceson updateSysResources fldNamesetErrorset cursor to watchget value(last word of the long name of this stack)put fileSpecification(it) into stackSpecif error() then exit updateSysResourcesget accessOtherCard(the target)if error() then exit updateSysResourcesif fldName is empty thenput 1 into jput the number of cd flds into nelse if there is a cd fld fldName thenput the number of cd fld fldName into jput j into nelseput 1 into jput 0 into nend ifrepeat with i = j to nset cursor to busyput the short name of cd fld i into fNameput findFile(fName,"STAK" & return & "APPL") into fSpecif fSpec is empty then next repeatput cd fld i into resourcesif resources is empty thenresourceCopy fSpec,stackSpecif error() thenreturnFromOtherCardexit updateSysResourcesend ifelserepeat with k = 1 to the number of lines in resourcesput line k of resources into resourceput offset(":",resource) into indexif index = 0 thenresourceCopy fSpec,stackSpec,resourceif error() thenreturnFromOtherCardexit updateSysResourcesend ifelseput char 1 to index - 1 of resource into resTypedelete char 1 to index of resourcerepeat with l = 1 to the number of items in resourceput item l of resource into resNameresourceCopy fSpec,stackSpec,resType,resNameif error() thenreturnFromOtherCardexit updateSysResourcesend ifend repeatend ifend repeatend ifend repeatreturnFromOtherCardend updateSysResources-- end script "System resources"</script>
</card>
card_7214.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpsend "updateSystemScripts" to this cdend mouseUp</script>
</part>
<part>
<id>6</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System notes</name>
<script>-- System notifications script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field name"--get cd fld fldName--put line 1 of it into fld "Text"--put line 2 of it into fld "Line 1" --iconput line 3 of it into fld "Line 2" --soundend ifend showSystemFieldon textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To update the notification definition;--put fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 30.1.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget targetask "'SICN' name or id:" with itif it is empty then exit line1Clickedend if--put it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 30.1.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget targetask "'snd' name or id:" with itif it is empty then exit line2Clickedend if--put it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clicked</script>
</part>
<part>
<id>7</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System card externals</name>
<script>-- System cards external script---- ©1990 by Ilkka Priha-- All rights reservedfunction SYSpopMenu menuName,defMsg,disMsg,subMenus-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To open a named menu and let the user to choose a message-- from it. Instructions on how to define menus are in the help field;---- PARAMS: menuName = name of the menu-- defMsg = default message (optional)-- disMsg = list of disabled messages (optional)-- subMenus = list of submenus (optional);---- RESULT: The message chosen;end SYSpopMenufunction SYSdefaultMenuMessage menuName,disMsg-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To return the default message of a named menu-- (if such is defined and is not disabled);---- PARAMS: menuName = name of the menu-- disMsg = list of disabled messages (optional);---- RESULT: The default message or empty;end SYSdefaultMenuMessagefunction SYScreateMenu menuName,...-- USAGE: Public; PROGRAMMER: imp; DATE: 14.9.1990;---- PURPOSE: To create the named menu(s) to the menubar;---- PARAMS: menuName(s) = name(s) of the menu(s);end SYScreateMenufunction SYSreportError-- USAGE: Private; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To report the previous run-time error to the user.-- Instructions on how to define new error messages can be found-- from the Help field. The fail message is the public part-- of the error management;---- NOTE: Uses external function newError, see also fail;end SYSreportErrorfunction SYSopenQuestion questionName,defaultAnswer,parameter, ¬timeout,location,locSpec,title,dialogId-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To ask a question from the user and return the answer.-- The name of the question and an optional default answer are-- given as parameters. "&" in the question text can be replaced-- with a parameter. See Help field on how to define questions;---- PARAMS: questionName = name of the question-- defaultAnswer = default answer (optional)-- parameter = parameter to be shown in the question-- text (optional)-- timeout = time out in seconds (optional)-- location,locSpec = location of the dialog (optional)-- title = title of the dialog (optional)-- dialogId = id of the dialog (optional);---- RESULT: The answer given by the user, or "cancel";end SYSopenQuestionfunction SYSopenOption questionName,parameter,timeout,location,locSpec, ¬title,dialogId-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To ask a question from the user with a set of options from-- which to select and return the answer. The name of the question-- is given as a parameter. "&" in the question text can be replaced-- with a parameter. See Help field on how to define questions;---- PARAMS: questionName = name of the question-- parameter = parameter to be shown in the question-- text (optional)-- timeout = time out in seconds (optional)-- location,locSpec = location of the dialog (optional)-- title = title of the dialog (optional)-- dialogId = id of the dialog (optional);---- RESULT: The option selected by the user;end SYSopenOptionon SYSshowMessage messageName,parameter,timeout,location,locSpec, ¬title,dialogId-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To show a message to the user. The name of the message-- is given as a parameter. "&" in the message text can be replaced-- with a parameter. See Help field on how to define messages;---- PARAMS: messageName = name of the message-- parameter = parameter to be shown in the message-- text (optional)-- timeout = time out in seconds (optional)-- location,locSpec = location of the dialog (optional)-- title = title of the dialog (optional)-- dialogId = id of the dialog (optional);end SYSshowMessageon SYSopenList listName,list,selType,parameter,timeout,¬location,locSpec,title,dialogId-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To let the user to select a line, or several lines,-- from a list of lines. The name of the list is given as a parameter.-- See Help field on how to define questions;---- PARAMS: listName = name of the list-- list = list from which to select-- selType = type of selection (optional):-- one = only one line-- con = several continuous lines-- dis = several lines in any order-- parameter = parameter to the list header (optional)-- timeout = timeout (optional)-- location,locSpec = location of the dialog (optional)-- title = title of the dialog (optional)-- dialogId = id of the dialog (optional);---- RESULT: The selected lines;--setTheTarget the targetpass SYSopenListend SYSopenListfunction SYStranslate phrases,reverse-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To translate the given phrases from the system language-- to the user language;---- PARAMS: phrases = phrases to translate-- reverse = if true, then translate from the user language-- to the system langugae (optional);---- RESULT: The translated phrases;end SYStranslateon SYSinstallNote noteName,parameter,iconName,soundName-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To install the named notification into the queue;---- PARAMS: noteName = name of the notification-- parameter = parameter to be shown in the notification-- text (optional);end SYSinstallNoteon SYSremoveNote-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To remove the installed notification from the queue;end SYSremoveNotefunction SYSnoteInstalled-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To return true, if there is an intalled notification;---- RESULT: True or false;end SYSNoteInstalled</script>
</part>
<part>
<id>8</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System scripts</name>
<script>-- System scripts script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field name"--get cd fld fldNameput it into fld "Text"--if the hilite of bg btn "Edit"then edit script of cd fld fldNameend ifend showSystemFieldon deleteSysField fldName-- USAGE: Private; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To delete a system field;---- PARAMS: fldName = name of the field;--set cursor to watch--if value("there is a cd fld fldName of" && the target) thenput value("cd fld fldName of" && the target) into objectsrepeat with i = 1 to the number of lines in objectsput line i of objects into objectif object is not empty thenif not objectExists(object) thenfail 3,"deleteSysField","Missing object",objectexit deleteSysFieldend if--put "-"&"- script" && quote & fldName & quote into startLineput "-"&"- end script" && quote & fldName & quote into endLine--put the script of object into wholeScript--put offset(startLine,wholeScript) into c1if c1 > 0 thenput offset(endLine,wholeScript) into c2if c2 < c1 thenfail 3,"deleteSysField","Syntax error in script",objectexit deleteSysFieldend if--if c1 = 1 thendelete char c1 to c2 + the number of chars ¬in endLine of wholeScriptelsedelete char c1 - 1 to c2 + the number of chars ¬in endLine - 1 of wholeScriptend if--set script of object to wholeScriptend ifend ifend repeatend if--pass deleteSysFieldend deleteSysFieldon renameSysField fldName,newName-- USAGE: Private; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To rename a system field;---- PARAMS: fldName = name of the field-- newName = new name for the field;--set cursor to watch--if value("there is a cd fld fldName of" && the target) thenput value("cd fld fldName of" && the target) into objectsrepeat with i = 1 to the number of lines in objectsput line i of objects into objectif object is not empty thenif not objectExists(object) thenfail 3,"renameSysField","Missing object",objectexit renameSysFieldend if--put "-"&"- script" && quote & fldName & quote into startLineput "-"&"- end script" && quote & fldName & quote into endLine--put the script of object into wholeScript--put offset(startLine,wholeScript) into c1if c1 > 0 thenput the number of chars in startLine - 1 into nput "-"&"- script" && quote & newName & quote into startLineput startLine into char c1 to c1 + n of wholeScript--put offset(endLine,wholeScript) into c2if c2 < c1 thenfail 3,"renameSysField","Syntax error in script",objectexit renameSysFieldend if--put the number of chars in endLine - 1 into nput "-"&"- end script" && quote & newName & quote into endLineput endLine into char c2 to c2 + n of wholeScript--set script of object to wholeScriptend ifend ifend repeatend if--pass renameSysFieldend renameSysFieldon updateSystemScripts-- USAGE: Public; PROGRAMMER: imp; DATE: 30.8.1990;---- PURPOSE: To update the scripts of the system;---- NOTE: Uses several XCmds;--setError--answer "Update the script?" with "OK" or "Cancel"if it is not "OK" then exit updateSystemScripts--if the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"updateSystemScripts","Missing field","",trueexit updateSystemScriptsend ifend if--send "updateSysScripts fldName" to the targetif error() thenfail 3,"updateSystemScripts","Update failed","",trueexit updateSystemScriptsend ifend updateSystemScriptson updateSysScripts fldName-- USAGE: Private; PROGRAMMER: imp; DATE: 30.8.1990;---- PURPOSE: To update the scripts of the system;---- PARAMS: fldName = name of script field to update (empty = all);---- NOTE: Uses several XCmds;--setError--set cursor to watch--get accessOtherCard(the target)if error() then exit updateSysScripts--if fldName is empty thenput 1 into jput the number of cd flds into nelse if there is a cd fld fldName thenput the number of cd fld fldName into jput j into nelseput 1 into jput 0 into nend if--repeat with i = j to nset cursor to busy--put cd fld i into objectsrepeat with k = 1 to the number of lines in objectsset cursor to busy--put line k of objects into objectif object is not empty thenif not objectExists(object) thenfail 3,"updateSysScripts","Missing object",objectexit updateSysScriptsend if--put the short name of cd fld i into scriptNameput "-"&"- script" && quote & scriptName & quote into startLineput "-"&"- end script" && quote & scriptName & quote into endLine--put the script of cd fld i into objectScriptput removeComments(objectScript) into objectScriptput removeEmptyLines(objectScript) into objectScriptif objectScript is not empty thenput startLine & return before objectScriptput return & endLine after objectScriptend if--put the script of object into wholeScript--put offset(startLine,wholeScript) into c1if c1 > 0 thenput offset(endLine,wholeScript) into c2if c2 < c1 thenfail 3,"updateSysScripts","Syntax error in script",objectexit updateSysScriptsend if--if c1 = 1 thendelete char c1 to c2 + the number of chars ¬in endLine of wholeScriptelsedelete char c1 - 1 to c2 + the number of chars ¬in endLine - 1 of wholeScriptend ifend if--if wholeScript is empty thenput objectScript into wholeScriptelse if objectScript is not empty thenput objectScript & return before wholeScriptend if--set script of object to wholeScriptend ifend repeatend repeat--returnFromOtherCardend updateSysScriptson clearSystemScripts-- USAGE: Public; PROGRAMMER: imp; DATE: 20.9.1990;---- PURPOSE: To clear the scripts of the system;---- NOTE: Uses several XCmds;--setError--answer "Clear the scripts of this stack?" with ¬"Include parts" or "Exclude parts" or "Cancel"if it is "Cancel" then exit clearSystemScripts--if it is "Include parts"then put true into partsAlsoelse put false into partsAlso--send "clearSysScripts partsAlso" to the targetif error() thenfail 3,"clearSystemScripts","Clear failed","",trueexit clearSystemScriptsend ifend clearSystemScriptson clearSysScripts partsAlso-- USAGE: Private; PROGRAMMER: imp; DATE: 20.9.1990;---- PURPOSE: To clear the scripts of the system;---- NOTE: Uses several XCmds;--setError--set cursor to watch--put the short id of this bg into systemBg--put the id of this cd into currentCd--lock screenset lockMessages to trueset lockRecent to true--set script of this stack to empty--repeat with i = 1 to the number of bkgndsset cursor to busy--if the short id of bg i is systemBg then next repeat--go to bg iif the result is not empty thengo to currentCdunlockScreenset lockMessages to falseset lockRecent to falsefail 3,"clearSysScripts","Problem in bkgnd",iexit clearSysScriptsend if--set script of this bg to empty--if partsAlso is true thenrepeat with j = 1 to the number of bg fldsset cursor to busyset script of bg fld j to emptyend repeat--repeat with j = 1 to the number of bg btnsset cursor to busyset script of bg btn j to emptyend repeatend if--repeat with j = 1 to the number of cds in this bgset cursor to busyset script of cd j of this bg to emptyend repeatend repeat--go to currentCd--unlock screenset lockMessages to falseset lockRecent to falseend clearSysScripts</script>
</part>
<part>
<id>11</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System cards</name>
<script>-- System card background script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon openBackground-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: OpenBackground is disabled in System Cards;--if the userLevel < 5 then go backend openBackgroundon openCard-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To update some fields of System Cards;--if the userLevel < 5 thengo backexit openCardend if--put the short name of the target into fld "Name"send "makeIndex" to the targetend openCardon closeCard-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To clear some fields of System Cards;--send "clearParameterFields" to the targetend closeCardon idle-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: Idle is disabled in System Cards;--if the userLevel < 5 then go backend idleon closeField-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To update date fields of System Cards after updates;--put the short date into fld "Date"put the long time into fld "Time"end closeFieldon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field name"--put cd fld fldName into fld "Text"end ifend showSystemFieldon createSystemField-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To create a new system field;--ask "System field name:"if (it is empty) or (it contains quote) then exit createSystemField--put it into fldName--send "createSysField fldName" to the target--send "makeIndex" to the target--send "showSystemField fldName" to the targetend createSystemFieldon createSysField fldName-- USAGE: Private; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To create a new system field;---- PARAMS: fldName = name of field;--set cursor to watch--if value("there is a cd fld fldName of" && the target)then exit createSysField--lock screenset lockMessages to trueset lockRecent to true--push card--get the targetgo to it--set editBkgnd to falseput "New Field" into opersend "doMenu oper without dialog" to HyperCardset name of last cd fld to fldNameset lockText of last cd fld to trueset rect of last cd fld to 0,0,1,1hide last cd fldchoose browse tool--pop card--set lockRecent to falseset lockMessages to falseunlock screenend createSysFieldon deleteSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 9.11.1990;---- PURPOSE: To delete a system field;---- PARAMS: fldName = name of the field;--answer "Delete system field?" with "Ok" or "Cancel"if it is "Cancel" then exit deleteSystemField--if fld "Field name" is fldNamethen send "clearParameterFields" to the target--send "deleteSysField fldName" to the target--send "makeIndex" to the targetend deleteSystemFieldon deleteSysField fldName-- USAGE: Private; PROGRAMMER: imp; DATE: 22.8.1990;---- PURPOSE: To delete a system field;---- PARAMS: fldName = name of the field;--set cursor to watch--if not value("there is a cd fld fldName of" && the target)then exit deleteSysField--lock screenset lockMessages to trueset lockRecent to true--push card--get the targetgo to it--show cd fld fldNameselect cd fld fldNameput "Clear Field" into opersend "doMenu oper without dialog" to HyperCardchoose browse tool--pop card--set lockRecent to falseset lockMessages to falseunlock screenend deleteSysFieldon renameSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To rename a system field;---- PARAMS: fldName = name of the field;--ask "New system field name:" with fldNameif it is empty then exit renameSystemField--put it into newName--send "renameSysField fldName,newName" to the target--if fld "Field name" is fldNamethen send "showSystemField newName" to the target--send "makeIndex" to the targetend renameSystemFieldon renameSysField fldName,newName-- USAGE: Private; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To rename a system field;---- PARAMS: fldName = name of the field-- newName = new name for the field;--set cursor to watch--if not value("there is a cd fld fldName of" && the target)then exit renameSysField--if newName is not fldName thenif value("there is a cd fld newName of" && the target)then exit renameSysFieldend if--do "set name of cd fld fldName of" && the target && "to newName"end renameSysFieldon clearParameterFields-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To clear parameter fields;--put "" into fld "Field name"put "" into fld "Text"--repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeat--repeat with i = 1 to 8put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson indexFldMoused-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To open or delete the item in the index field-- clicked with the mouse;--put value(the clickLine) into fldNameif fldName is not empty thenif the optionKey is "down"then send "deleteSystemField fldName" to this cdelse send "showSystemField fldName" to this cdend ifend indexFldMousedon nameClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To change the name of a system field;--put target into fldNameif it is not emptythen send "renameSystemField fldName" to this cdend nameClickedon changeLanguage-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To change the language field;--if the optionKey is "down" thenanswer "Clear field?" with "OK" or "Cancel"if it is not "OK" then exit changeLanguageget emptyelseget targetask "User language:" with itif it is empty then exit changeLanguageend if--put it into targetend changeLanguageon editText onOff-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: Edit message for text field;--set lockText of fld "Text" to not onOffend editTexton textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To update the definition;--put fld "Field Name" into fldNameif fldName is not empty thenget targetput it into cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for line field;end line1Clickedon line2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for line field;end line2Clickedon line3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for line field;end line3Clickedon line4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for line field;end line4Clickedon par1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par1Clickedon par2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par2Clickedon par3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par3Clickedon par4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par4Clickedon par5Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par5Clickedon par6Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par6Clickedon par7Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par7Clickedon par8Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: Dummy message for parameter field;end par8Clickedon tryMouseStillDown-- USAGE: Public; PROGRAMMER: imp; DATE: 31.1.1990;---- PURPOSE: Dummy message for the try it button;end tryMouseStillDownon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 31.1.1990;---- PURPOSE: Dummy message for the try it button;end tryMouseUpon makeIndex-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To update the index field of a system card;--put "" into fldList--repeat with i = 1 to the number of cd fldsput the short name of cd fld i into line i of fldListend repeat--sort lines of fldList international--put fldList into fld "Index"end makeIndexon standardFields-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To standardize the system fields;--put the number of cd flds into nrepeat with i = 1 to the number of cd fldsset textStyle of cd fld i to "plain"set textFont of cd fld i to "Geneva"set textSize of cd fld i to 12set textHeight of cd fld i to 16set textAlign of cd fld i to "left"set lockText of cd fld i to trueset style of cd fld i to "transparent"set showLines of cd fld i to falseset visible of cd fld i to falseset rect of cd fld i to 0,0,1,1end repeatend standardFieldson backupSystemFields-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To start the backup of the system fields-- on the target card;---- NOTE: Uses several XCmds;--setError--ask file "Backup file:"if it is empty then exit backupSystemFields--put it into fileSpec--if the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"backupSystemFields","Missing field","",trueexit backupSystemFieldsend ifend if--send "backupSysFields fileSpec,fldName" to the targetif error() thenfail 3,"backupSystemFields","Backup failed","",trueexit backupSystemFieldsend ifend backupSystemFieldson backupSysFields fileSpec,fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To backup system fields on the target card into a file;---- PARAMS: fileSpec = specification of the file-- fldName = name of the field (empty = all);---- NOTE: Uses several XCmds;--set cursor to watch--if fldName is emptythen put "card fields" into fldNameelse put "card field" && quote & fldName & quote into fldName--put the name of this stack into line 1 of specput the name of the target into line 2 of specput fldName into line 3 of specput "end card" into line 4 of specput "end stack" into line 5 of spec--backupStack fileSpec,specend backupSysFieldson restoreSystemFields-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To start the restore of the system fields-- on the target card;---- NOTE: Uses several XCmds;--setError--answer file "Backup file:" of type "TEXT"if it is empty then exit restoreSystemFields--put it into fileSpec--if the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"restoreSystemFields","Missing field","",trueexit restoreSystemFieldsend ifend if--send "restoreSysFields fileSpec,fldName" to the targetif error() thenfail 3,"restoreSystemFields","Restoring failed","",trueexit restoreSystemFieldsend ifend restoreSystemFieldson restoreSysFields fileSpec,fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To restore system fields on the target card into a file;---- PARAMS: fileSpec = specification of the file-- fldName = name of the field (empty = all);---- NOTE: Uses several XCmds;--set cursor to watch--if fldName is emptythen put "card fields" into fldNameelse put "card field" && quote & fldName & quote into fldName--put the name of this stack into line 1 of specput the name of the target into line 2 of specput fldName into line 3 of specput "end card" into line 4 of specput "end stack" into line 5 of spec--restoreStack fileSpec,specend restoreSysFieldson installSystemFields-- USAGE: Public; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To install the target System Card to some stack;---- NOTE: Uses several XCmds;--setError--answer "Install" with "Structure" or "Scripts" or "Contents"put it into sel--answer file "Destination:" of type "STAK"if it is empty then exit installSystemFields--put it into sName--get the long name of this stackdelete word 1 of itdelete first char of itdelete last char of itif it is sName thenfail 3,"installSystemFields","Local stack","",trueexit installSystemFieldsend if--if sel is "Structure" thensend "installSysStructure sName" to the targetelse if sel is "Scripts" thensend "installSysScripts sName" to the targetelse if sel is "Contents" thenif the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"installSystemFields","Missing field","",trueexit installSystemFieldsend ifend if--send "installSysFields sName,fldName" to the targetend ifif error() thenfail 3,"installSystemFields","Installation failed","",trueexit installSystemFieldsend ifend installSystemFieldson installSysStructure sName-- USAGE: Private; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To install the structure of the target card-- to some stack;---- NOTE: Uses several XCmds;--setError--set cursor to watch--if sName is empty thenfail 3,"installSysScripts","Missing stack"exit installSysStructureend if--get the name of the targetput objectSpec("","","",it,"bg","System Card",sName) into otherCdif not objectExists(otherCd) thenfail 3,"installSysStructure","Missing card",itexit installSysStructureend if---- install the card script, background field contents and card buttonsget accessOtherCard(the target)if error() then exit installSysStructure--put the script of this cd into scriptText--repeat with i = 0 to the number of bg fldsset cursor to busy--if i > 0 thenput the name of bg fld i into fldSpecput bg fld i into contentsend if--get accessOtherCard(otherCd)if error() thenreturnFromOtherCardexit installSysStructureend if--if i > 0 thenif value("there is a" && fldSpec) thendo "put contents into" && fldSpecend ifelseset script of this cd to scriptTextend if--returnFromOtherCardend repeat--set editBkgnd to false--put the tool into cTool--put "Copy Button" into cOperput "Paste Button" into pOperput "Clear Button" into dOperrepeat with i = 0 to the number of cd btnsset cursor to busy--if i > 0 thenput the visible of cd btn i into dontHideshow cd btn iselect cd btn isend "doMenu cOper" to HyperCardif not dontHide then hide cd btn iend if--get accessOtherCard(otherCd)if error() thenchoose cToolreturnFromOtherCardexit installSysStructureend if--if i > 0 thensend "doMenu pOper without dialog" to HyperCardif not dontHide thenhide last cd btnend ifelserepeat with j = the number of cd btns down to 1show cd btn jselect cd btn jsend "doMenu dOper without dialog" to HyperCardend repeatend if--returnFromOtherCardend repeat--choose cTool--returnFromOtherCardend installSysStructureon installSysScripts sName-- USAGE: Private; PROGRAMMER: imp; DATE: 20.9.1990;---- PURPOSE: To install the scripts of the target card-- to some stack;---- NOTE: Uses several XCmds;--setError--set cursor to watch--if sName is empty thenfail 3,"installSysScripts","Missing stack"exit installSysScriptsend if--get the name of the targetput objectSpec("","","",it,"bg","System Card",sName) into otherCdif not objectExists(otherCd) thenfail 3,"installSysScripts","Missing card",itexit installSysScriptsend if---- install the card script and card button scriptsget accessOtherCard(the target)if error() then exit installSysScripts--put the script of this cd into scriptText--repeat with i = 0 to the number of cd btnsset cursor to busy--if i > 0 thenput the script of cd btn i into btnScriptend if--get accessOtherCard(otherCd)if error() thenreturnFromOtherCardexit installSysScriptsend if--if i > 0 thenif there is a cd btn i thenset script of cd btn i to btnScriptend ifelseset script of this cd to scriptTextend if--returnFromOtherCardend repeat--returnFromOtherCardend installSysScriptson installSysFields sName,fldName-- USAGE: Private; PROGRAMMER: imp; DATE: 29.8.1990;---- PURPOSE: To install the system fields of the target card-- to some stack;---- PARAMS: sName = name of the stack-- fldName = specification of the field (empty = all);---- NOTE: Uses several XCmds;--setError--set cursor to watch--if sName is empty thenfail 3,"installSysFields","Missing stack"exit installSysFieldsend if--get the name of the targetput objectSpec("","","",it,"bg","System card",sName) into otherCdif not objectExists(otherCd) thenfail 3,"installSysFields","Missing card",itexit installSysFieldsend if--get accessOtherCard(the target)if error() then exit installSysFields--put the tool into cTool--set editBkgnd to false--if fldName is empty thenput 1 into jput the number of cd flds into nelse if there is a cd fld fldName thenput the number of cd fld fldName into jput j into nelseput 1 into jput 0 into nend if--put "Copy Field" into cOperput "Paste Field" into pOperrepeat with i = j to nset cursor to busy--put the name of cd fld i into fldSpec--put the script of cd fld i into scriptText--put cd fld i into contents--show cd fld iselect cd fld isend "doMenu cOper without dialog" to HyperCardhide cd fld i--get accessOtherCard(otherCd)if error() thenchoose cToolreturnFromOtherCardexit installSysFieldsend if--if not value("there is a" && fldSpec) thensend "doMenu pOper without dialog" to HyperCardhide last cd fldelseset script of fldSpec to scriptTextend if--do "put contents into" && fldSpec--returnFromOtherCardend repeat--choose cTool--returnFromOtherCardend installSysFields</script>
</part>
<part>
<id>13</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System questions</name>
<script>-- System questions script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field Name"--get cd fld fldNameput line 1 of it into fld "Text"--put line 2 of it into fld "Line 1" -- default answerput line 3 of it into fld "Line 2" -- max length--put line 4 of it into fld "Par 1" -- timeoutput line 5 of it into fld "Par 2" -- x,yput line 6 of it into fld "Par 3" -- positionput line 7 of it into fld "Par 4" -- titleput line 8 of it into fld "Par 5" -- DLOGend ifend showSystemFieldon clearParameterFields-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To clear parameter fields;--put "" into fld "Field Name"put "" into fld "Text"--repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeat--repeat with i = 1 to 6put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To update the question definition;--put fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Default answer:" with itif it is empty then exit line1Clickedend if--put it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget line 1 of targetask "Max length:" with itif it is empty then exit line2Clickedend if--put it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clickedon par1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend if--put it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend if--put it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend if--put it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend if--put it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend if--put it into the targetput it into line 8 of cd fld fldNamecloseFieldend ifend par5Clickedon par7Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par7Clickedget emptyelseget line 1 of targetask "Text of the 'Ok' button:" with itif it is empty then exit par7Clickedend if--put it into the targetcloseFieldend par7Clickedon par8Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par8Clickedget emptyelseget line 1 of targetask "Text of the 'Cancel' button:" with itif it is empty then exit par8Clickedend if--put it into the targetcloseFieldend par8Clickedon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To demonstrate the question facility;--put fld "Field Name" into fldNameif fldName is not empty thenget SYSopenQuestion(fldName,empty,"<parameter>")put itend ifend tryMouseUp</script>
</part>
<part>
<id>14</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System options</name>
<script>-- System options script---- ©1990 by Ilkka Priha-- Tiihonen Software company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field Name"--get cd fld fldNameput line 1 of it into fld "Text"--put line 2 of it into fld "Line 1" -- optionsput line 3 of it into fld "Line 2" -- alternatives--put line 4 of it into fld "Par 1" -- timeoutput line 5 of it into fld "Par 2" -- locationput line 6 of it into fld "Par 3" -- positionput line 7 of it into fld "Par 4" -- titleput line 8 of it into fld "Par 5" -- DLOGend ifend showSystemFieldon textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To update the question definition;--put fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "User options:" with itif it is empty then exit line1Clickedend if--put it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget line 1 of targetask "System alternatives:" with itif it is empty then exit line2Clickedend if--put it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clickedon par1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend if--put it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend if--put it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend if--put it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend if--put it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend if--put it into the targetput it into line 8 of cd fld fldNamecloseFieldend ifend par5Clickedon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To demonstrate the option facility;--put fld "Field Name" into fldNameif fldName is not empty thenget SYSopenOption(fldName,"<parameter>")put itend ifend tryMouseUp</script>
</part>
<part>
<id>16</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System index</name>
<script>-- System index script---- ©1990 by Ilkka Priha-- Tiihonen Sotware Company Ltd, Finland-- All rights reservedon makeIndex-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To update the index field of the System Index card;--put "" into indexListrepeat with i = 2 to the number of cds in bg "System Card"put the short name of cd i of bg "System Card" ¬into line i - 1 of indexListend repeat--put indexList into fld "Index"end makeIndexon indexFldMoused-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To open the item in the index field-- clicked with the mouse;--get value(the clickLine)if it is not empty thenvisual effect iris open fastgo to card itend ifend indexFldMousedon clearParameterFields-- USAGE: Public; PROGRAMMER: imp; DATE: 3.9.1990;---- PURPOSE: Dummy clear;end clearParameterFieldson createSystemField-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: Dummy create;end createSystemFieldon showSystemField-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: Dummy show;end showSystemFieldon deleteSystemField-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: Dummy delete;end deleteSystemFieldon renameSystemField-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: Dummy rename;end renameSystemFieldon backupSysFields fileSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 3.9.1990;---- PURPOSE: To backup system fields on the system cards into a file;---- PARAMS: fileSpec = specification of the file;---- NOTE: Uses several XCmds;--set cursor to watch--put the name of this stack into line 1 of specput "bkgnd" && quote & "System card" & quote into line 2 of specput "card fields" into line 3 of specput "end bkgnd" into line 4 of specput "end stack" into line 5 of spec--backupStack fileSpec,specend backupSysFieldson restoreSysFields fileSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 3.9.1990;---- PURPOSE: To restore system fields on the system cards from a file;---- PARAMS: fileSpec = specification of the file;---- NOTE: Uses several XCmds;--set cursor to watch--put the name of this stack into line 1 of specput "bkgnd" && quote & "System card" & quote into line 2 of specput "card fields" into line 3 of specput "end bkgnd" into line 4 of specput "end stack" into line 5 of spec--restoreStack fileSpec,specend restoreSysFieldson installSysStructure sName,recursion-- USAGE: Private; PROGRAMMER: imp; DATE: 20.9.1990;---- PURPOSE: To install the structure of the system cards-- to some stack;---- PARAMS: sName = name of the stack-- recursion = if true, then a recursive call;--setError--if recursion is true then pass installSysStructure--set cursor to watch--if sName is empty thenfail 3,"installSysStructure","Missing stack"exit installSysStructureend if--put objectSpec("","","","","bg","System card",sName) into bgSpecif not objectExists(bgSpec) then-- missing background -> copy the cardssend "installSysCards sName,false" to the targetelse-- install the backgroundget accessOtherCard(the target)if error() then exit installSysStructure--put the script of this bg into scriptText--set editBkgnd to true--put the tool into cTool--put "Copy Field" into cOperput "Paste Field" into pOperput "Clear Field" into dOperrepeat with i = 0 to the number of bg fldsset cursor to busy--if i > 0 thenput the visible of bg fld i into dontHideshow bg fld iselect bg fld isend "doMenu cOper without dialog" to HyperCardif not dontHide then hide bg fld iend if--get accessOtherCard(bgSpec)if error() thenchoose cToolset editBkgnd to falsereturnFromOtherCardexit installSysStructureend if--if i > 0 thensend "doMenu pOper without dialog" to HyperCardif not dontHide thenhide last bg fldend ifelseset script of this bg to scriptText--repeat with j = the number of bg flds down to 1show bg fld jselect bg fld jsend "doMenu dOper without dialog" to HyperCardend repeatend if--returnFromOtherCardend repeat--put "Copy Button" into cOperput "Paste Button" into pOperput "Clear Button" into dOperrepeat with i = 0 to the number of bg btnsset cursor to busy--if i > 0 thenput the visible of bg btn i into dontHideshow bg btn iselect bg btn isend "doMenu cOper without dialog" to HyperCardif not dontHide then hide bg btn iend if--get accessOtherCard(bgSpec)if error() thenchoose cToolset editBkgnd to falsereturnFromOtherCardexit installSysStructureend if--if i > 0 thensend "doMenu pOper without dialog" to HyperCardif not dontHide thenhide last bg btnend ifelserepeat with j = the number of bg btns down to 1show bg btn jselect bg btn jsend "doMenu dOper without dialog" to HyperCardend repeatend if--returnFromOtherCardend repeat--choose cTool--set editBkgnd to false--returnFromOtherCard---- install the cardsrepeat with i = 1 to the number of cds in bg "System card"put objectSpec("","","cd",i,"bg","System card") into cdSpecsend "installSysStructure sName,true" to cdSpecif error() then exit installSysStructureend repeatend ifend installSysStructureon installSysScripts sName,recursion-- USAGE: Private; PROGRAMMER: imp; DATE: 20.9.1990;---- PURPOSE: To install the scripts of the system cards-- to some stack;---- PARAMS: sName = name of the stack-- recursion = if true, then a recursive call;--setError--if recursion is true then pass installSysScripts--set cursor to watch--if sName is empty thenfail 3,"installSysScripts","Missing stack"exit installSysScriptsend if--put objectSpec("","","","","bg","System card",sName) into bgSpecif not objectExists(bgSpec) then-- missing background -> copy the cardssend "installSysCards sName,false" to the targetelse-- install the backgroundget accessOtherCard(the target)if error() then exit installSysScripts--put the script of this bg into scriptText--repeat with i = 0 to the number of bg fldsset cursor to busy--if i > 0 thenput the script of bg fld i into partScriptend if--get accessOtherCard(bgSpec)if error() thenreturnFromOtherCardexit installSysScriptsend if--if i > 0 thenif there is a bg fld i thenset script of bg fld i to partScriptend ifelseset script of this bg to scriptTextend if--returnFromOtherCardend repeat--repeat with i = 1 to the number of bg btnsset cursor to busy--if i > 0 thenput the script of bg btn i into partScriptend if--get accessOtherCard(bgSpec)if error() thenreturnFromOtherCardexit installSysScriptsend if--if there is a bg btn i thenset script of bg btn i to partScriptend if--returnFromOtherCardend repeat--returnFromOtherCard---- install the cardsrepeat with i = 1 to the number of cds in bg "System card"put objectSpec("","","cd",i,"bg","System card") into cdSpecsend "installSysScripts sName,true" to cdSpecif error() then exit installSysScriptsend repeatend ifend installSysScriptson installSysFields sName,fldName,recursion-- USAGE: Private; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To install the system fields on the system cards-- to some stack;---- PARAMS: sName = name of the stack-- fldName = name of the field (not used in this context)-- recursion = if true, then a recursive call;---- NOTE: Uses several XCmds;--setError--if recursion is true then pass installSysFields--set cursor to watch--if sName is empty thenfail 3,"installSysFields","Missing stack"exit installSysFieldsend if--put objectSpec("","","","","bg","System card",sName) into bgSpecif not objectExists(bgSpec) then-- missing background -> copy the cardssend "installSysCards sName,true" to the targetelserepeat with i = 1 to the number of cds in bg "System card"put objectSpec("","","cd",i,"bg","System card") into cdSpecsend "installSysFields sName,empty,true" to cdSpecif error() then exit installSysFieldsend repeatend ifend installSysFieldson installSysCards sName,installFields-- USAGE: Private; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To copy the system cards to some stack;---- PARAMS: sName = name of the stack-- installFields = if true, then copy the system fields also;---- NOTE: Uses several XCmds;--setError--if sName is empty thenfail 3,"installSysFields","Missing stack"exit installSysCardsend if--put objectSpec("","","","","bg","System card") into bgSpecget accessOtherCard(bgSpec)if error() then exit installSysCards--put objectSpec("","","cd",1,"","",sName) into stackSpec--put the tool into cTool--put "Copy Card" into cOperput "Paste Card" into pOperput "Clear Field" into dOperrepeat with i = the number of cds in this bg down to 1set cursor to busy--go to cd i of this bgsend "doMenu cOper without dialog" to HyperCard--get accessOtherCard(stackSpec)if error() thenchoose cToolreturnFromOtherCardexit installSysCardsend if--send "doMenu pOper without dialog" to HyperCard--if installFields is not true then-- delete system fieldsrepeat with j = the number of cd flds down to 1show cd fld jselect cd fld jsend "doMenu dOper without dialog" to HyperCardend repeatend if--returnFromOtherCardend repeat--choose cTool--returnFromOtherCardend installSysCards</script>
</part>
<part>
<id>17</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System errors</name>
<script>-- System errors script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon clearParameterFields-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To clear parameter fields;--put "" into fld "Field Name"put "" into fld "Text"--repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeat--repeat with i = 5 to 8put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To update the error definition;--put fld "Field Name" into fldNameif fldName is not empty thenget targetput it into cd fld fldNameend ifend textClickedon par1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Notice message:" with itif it is empty then exit par1Clickedend if--put it into the targetcloseFieldend par1Clickedon par2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Warning message:" with itif it is empty then exit par2Clickedend if--put it into the targetcloseFieldend par2Clickedon par3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Error message:" with itif it is empty then exit par3Clickedend if--put it into the targetcloseFieldend par3Clickedon par4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Fatal message:" with itif it is empty then exit par4Clickedend if--put it into the targetcloseFieldend par4Clickedon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To demonstrate the error facility;--put fld "Field Name" into fldNameif fldName is not empty thenfail 3,"tryMouseUp",fldName,"<parameter>",trueend ifend tryMouseUp</script>
</part>
<part>
<id>18</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System resources</name>
<script>-- System resources script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon updateSystemResources-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To update the resources of the system;---- NOTE: Uses several XCmds;--setError--answer "Update the resources?" with "OK" or "Cancel"if it is not "OK" then exit updateSystemResources--if the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"updateSystemResources","Missing field","",trueexit updateSystemResourcesend ifend if--send "updateSysResources fldName" to the targetif error() thenfail 3,"updateSystemResources","Update failed","",trueexit updateSystemResourcesend ifend updateSystemResourceson updateSysResources fldName-- USAGE: Private; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To update the resources of the system;---- PARAMS: fldName = name of resource field to update (empty = all);---- NOTE: Uses several XCmds;--setError--set cursor to watch--get value(last word of the long name of this stack)put fileSpecification(it) into stackSpecif error() then exit updateSysResources--get accessOtherCard(the target)if error() then exit updateSysResources--if fldName is empty thenput 1 into jput the number of cd flds into nelse if there is a cd fld fldName thenput the number of cd fld fldName into jput j into nelseput 1 into jput 0 into nend if--repeat with i = j to nset cursor to busy--put the short name of cd fld i into fNameput findFile(fName,"STAK" & return & "APPL") into fSpecif fSpec is empty then next repeat--put cd fld i into resourcesif resources is empty then-- all resourcesresourceCopy fSpec,stackSpecif error() thenreturnFromOtherCardexit updateSysResourcesend ifelserepeat with k = 1 to the number of lines in resourcesput line k of resources into resourceput offset(":",resource) into indexif index = 0 then-- all resources of the given typeresourceCopy fSpec,stackSpec,resourceif error() thenreturnFromOtherCardexit updateSysResourcesend ifelse-- specific resourcesput char 1 to index - 1 of resource into resTypedelete char 1 to index of resourcerepeat with l = 1 to the number of items in resourceput item l of resource into resNameresourceCopy fSpec,stackSpec,resType,resNameif error() thenreturnFromOtherCardexit updateSysResourcesend ifend repeatend ifend repeatend ifend repeat--returnFromOtherCardend updateSysResources</script>
</part>
<part>
<id>19</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System lists</name>
<script>-- System lists script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field Name"--get cd fld fldNameput line 1 of it into fld "Text"--put line 2 of it into fld "Line 1" -- selection specput line 3 of it into fld "Line 2" -- max length--put line 4 of it into fld "Par 1" -- timeoutput line 5 of it into fld "Par 2" -- locationput line 6 of it into fld "Par 2" -- positionput line 7 of it into fld "Par 5" -- titleput line 8 of it into fld "Par 6" -- DLOGend ifend showSystemFieldon clearParameterFields-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To clear parameter fields;--put "" into fld "Field Name"put "" into fld "Text"--repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeat--repeat with i = 1 to 6put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To update the question definition;--put fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Selection (one, con or dis):" with itif it is empty then exit line1Clickedend if--put it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget line 2 of targetask "Max length:" with itif it is empty then exit line2Clickedend if--put it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clickedon par1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend if--put it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend if--put it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend if--put it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend if--put it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend if--put it into the targetput it into line 8 of cd fld fldNamecloseFieldend ifend par5Clickedon par7Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par7Clickedget emptyelseget line 1 of targetask "Text of the 'Select' button:" with itif it is empty then exit par7Clickedend if--put it into the targetcloseFieldend par7Clickedon par8Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To change the parameter field;--if the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par8Clickedget emptyelseget line 1 of targetask "Text of the 'Cancel' button:" with itif it is empty then exit par8Clickedend if--put it into the targetcloseFieldend par8Clickedon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 24.8.1990;---- PURPOSE: To demonstrate the list facility;--put fld "Field Name" into fldNameif fldName is not empty thenput "123456789012345678901234567890123456789012345678901234567890" ¬into listItemsrepeat with i = 2 to 20put "Item"&& i into line i of listItemsend repeat--get SYSopenList(fldName,listItems,empty,"<parameter>")put itend ifend tryMouseUp</script>
</part>
<part>
<id>22</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System menus</name>
<script>-- System menus script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon tryMouseStillDown-- USAGE: Public; PROGRAMMER: imp; DATE: 31.8.1990;---- PURPOSE: To demonstrate the menu facility;--put fld "Field Name" into fldNameif fldName is not empty thenget SYSpopMenu(fldName)put itend ifend tryMouseStillDown</script>
</part>
<part>
<id>26</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System utilities</name>
<script>-- System utilities script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon menuMouseDown menuName,defMsg,disMsg-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: Standard mouseStillDown for pop-up menu based objects.-- It lets the user to choose a message from a pop-up menu and-- then activates the target with that message;---- PARAMS: menuName = name of the menu connected to the object-- and located on the "Menus" System Card-- defMsg = name of an optional default message followed-- by its parameters-- disMsg = list of optional disabled messages-- &rest = optional parameters to the selected message;---- NOTE: menuMouseUp can be called afterwards;--setError--wait for 6 ticks --to make mouseUp possible--if the mouse is down then --open a pop-up menulockMouseUp --lock the next mouseUp message--put SYSpopMenu(menuName,defMsg,disMsg) into menuMsgif error() thenfail 3,"menuMouseDown","Operation failed","pop-up menu"exit menuMouseDownend if--if menuMsg is not empty thenset cursor to watch--repeat with i = 4 to the paramCountput ",param("&i&")" after item 1 of menuMsgend repeat--send item 1 of menuMsg && item 2 to 99 of menuMsg to the targetend ifend ifend menuMouseDownon menuMouseUp menuName,defMsg,disMsg-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: Standard mouseUp for pop-up menu based objects. It-- activates the target with the given default message, or with-- the default message associated to the menu;---- PARAMS: menuName = name of the menu connected to the object-- and located on the "Menus" System Card-- defMsg = name of an optional default message-- disMsg = list of optional disabled messages-- &rest = optional parameters to the selected message;---- NOTE: menuMouseDown should be called beforehand;--setError--if mouseUpLocked() then exit menuMouseUp --menu already opened--if defMsg is empty thenput SYSdefaultMenuMessage(menuName,defMsg,disMsg) into defMsgif error() thenfail 3,"menuMouseUp","Operation failed","pop-up menu"exit menuMouseUpend ifend if--if defMsg is not empty thenset cursor to watch--repeat with i = 4 to the paramCountput ",param("&i&")" after item 1 of defMsgend repeat--send item 1 of defMsg && item 2 to 99 of defMsg to the targetend ifend menuMouseUpon subMenuMouseDown menuName,defMsg,disMsg,subMenus-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: Standard mouseStillDown for pop-up menu based objects.-- It differs from the menuMouseDown message in that it allows-- submenus given as parameters;---- PARAMS: menuName = name of the menu connected to the object-- and located on the "Menus" System Card-- defMsg = name of an optional default message followed-- by its parameters-- disMsg = list of optional disabled messages-- subMenus = list of optional submenus-- &rest = optional parameters to the selected message;---- NOTE: menuMouseUp can be called afterwards;--setError--if the mouse is down then --open a pop-up menulockMouseUp --lock the next mouseUp message--put SYSpopMenu(menuName,defMsg,disMsg,subMenus) into meneMsgif error() thenfail 3,"subMenuMouseDown","Operation failed","pop-up menu"exit subMenuMouseDownend if--if menuMsg is empty thenfail 2,"subMenuMouseDown","Unknown message","pop-up menu"exit subMenuMouseDownend if--set cursor to watch--repeat with i = 5 to the paramCountput ",param("&i&")" after item 1 of menuMsgend repeat--send item 1 of menuMsg && item 2 to 99 of menuMsg to the targetend ifend subMenuMouseDownfunction createCard bgSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 1.11.1990;---- PURPOSE: To create a new card to the specified background.-- The new card is located as the last card of the background;---- PARAMS: bgSpec = specification of the background;---- RESULT: The id of the new card;--setError--put the long name of this stack into currentStack--get accessOtherCard(bgSpec)if error() then exit createCard--go to last cd of this bg--choose browse toolput "New Card" into operationsend "doMenu operation" to HyperCard--if the long name of this stack is not currentStackthen put the long id of this cd into newCdelse put the id of this cd into newCd--returnFromOtherCard--return newCdend createCardfunction copyCard cdSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 1.11.1990;---- PURPOSE: To copy the specied card. New card is located next-- to the current card;---- PARAMS: cdSpec = specification of the card;---- RESULT: The id of the new card;--setError--storeCard cdSpecif error() then exit copyCard--put the id of this cd into currentCd--lockAllchoose browse toolput "Paste Card" into operationsend "doMenu operation" to HyperCard--put the id of this cd into newCd--go to currentCdunlockAll--return newCdend copyCardon storeCard cdSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 1.11.1990;---- PURPOSE: To store a copy of the specified card into the clipboard;---- PARAMS: cdSpec = specification of the card;--setError--get accessOtherCard(cdSpec)if error() then exit storeCard--choose browse toolput "Copy Card" into operationsend "doMenu operation" to HyperCard--returnFromOtherCardend storeCardon deleteCards cdList-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To delete the given cards;---- PARAMS: cdList = list of card specifications;--lockAllchoose browse toolput "Delete Card" into operationput the long id of this cd into currentCdrepeat with i = 1 to the number of lines in cdListgo to line i of cdListset cantDelete of this card to falseif the long id of this cd is currentCd then put "" into currentCdsend "doMenu operation" to HyperCardend repeatif currentCd is not empty then go to currentCdunlockAllend deleteCardsfunction createPart partT,cdSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 30.10.1990;---- PURPOSE: To create a new part on a specified card;---- PARAMS: partT = type of the part:-- button = create a new card button-- field = create a new field-- cdSpec = specification of the card;---- RESULT: The spec of the new part;--setError--if first char of partT is "b"then put "button" into partTelse put "field" into partT--get accessOtherCard(cdSpec)if error() then exit createPart--put value("the number of card"&&partT&"s") into n--set editBkgnd to falsechoose browse toolput "New" && partT into operationsend "doMenu operation" to HyperCardchoose browse toolif value("there is a cd"&&partT&&(n + 1)) thenput "card"&&partT&&"id"&&the short id of cd btn (nb + 1) into newPartelsefail 3,"createPart","Operation failed","create"returnFromOtherCardexit createPartend if--get the name of newPart --change number to nameput objectSpec("",it,"",cdSpec) into partSpec--returnFromOtherCard--return partSpecend createPartfunction copyPart partSpec,cdSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 30.10.1990;---- PURPOSE: To create a new part by copying the given part.-- The new part is located to a specified card;---- PARAMS: partSpec = part to copy-- cdSpec = specification of the card;---- RESULT: The spec of the new part;--setError--storePart partSpecif error() then exit copyPart--get accessOtherCard(cdSpec)if error() thenfail 3,"copyPart","Missing card",cdSpecexit copyPartend if--put the number of cd btns into nb --to compare laterput the number of cd flds into nf --to compare later--set editBkgnd to falsechoose browse tooltype "V" with commandKey,shiftKeychoose browse toolif value("there is a cd btn"&&(nb + 1)) then --it was a buttonput "card button id"&&the short id of cd btn (nb + 1) into newPartelse if value("there is a cd fld"&&(nf + 1)) then --it was a fieldput "card field id"&&the short id of cd fld (nf + 1) into newPartelsefail 3,"copyPart","Operation failed","copy"returnFromOtherCardexit copyPartend if--put objectSpec("",newPart,"",cdSpec) into partSpec--returnFromOtherCard--return partSpecend copyParton storePart partSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 30.10.1990;---- PURPOSE: To store a copy of the given part into the clipboard;---- PARAMS: partSpec = specification of the part;--setError--get accessOtherCard(partSpec)if error() then exit storePart--put it into partSpecif not objectExists(partSpec) thenfail 3,"storePart","Missing part",partSpecreturnFromOtherCardexit storePartend if--if not the visible of partSpec thenshow partSpecput true into hiddenPartelseput false into hiddenPartend if--select partSpectype "C" with commandKeychoose browse tool--if hiddenPart then hide partSpec--returnFromOtherCardend storeParton deletePart partSpec-- USAGE: Public; PROGRAMMER: imp; DATE: 30.10.1990;---- PURPOSE: To delete the given part from the card and-- store a copy of it into the clipboard;---- PARAMS: partSpec = specification of the part;--setError--get accessOtherCard(partSpec)if error() then exit deletePart--put it into partSpecif not objectExists(partSpec) thenfail 2,"deletePart","Missing part",partSpecreturnFromOtherCardexit deletePartend if--if not the visible of partSpec thenshow partSpecput true into hiddenPartelseput false into hiddenPartend if--select partSpectype "X" with commandKeychoose browse tool--returnFromOtherCardend deleteParton goToCard cdSpec,vEffect,inNewWindow,dontPush-- USAGE: Public; PROGRAMMER: imp; DATE: 21.9.1990;---- PURPOSE: To go to the given card;---- PARAMS: cdSpec = specification of the card-- vEffect = visual effect-- inNewWindow = if true, then open a new window-- dontPush = if true, then do not push the card-- into the browsed cards path;---- check push card pathif dontPush is not truethen pushCardPath---- check new windowif inNewWindow is true thenif vEffect is not emptythen visual effect vEffect--go to cdSpec in a new windowput the result into status--if status is "Cancel" thenif dontPush is not truethen get popCardPath()--put empty into statusend ifelseput "Same window" into statusend if--if status is not empty thenif vEffect is not emptythen visual effect vEffect--go to cdSpecend ifend goToCardon returnBack-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To return to the previous card stored into the-- stack of browsed cards;--put popCardPath() into cdSpecif cdSpec is not emptythen goToCard cdSpec,"iris close fast",false,trueend returnBackon goHome-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To go to the home card;--goToCard "this card of Home","dissolve fast"end goHomeon goToBtnCard bgName,stName-- USAGE: Public; PROGRAMMER: imp; DATE: 21.9.1990;---- PURPOSE: To go to the card named by the target button;---- PARAMS: bgName = name of the background-- stName = name of the stack (optional);--put the short name of the target into cdNameif cdName is empty then exit goToBtnCard--get objectSpec("","","","","bg",bgName,stName)put cardNamed(cdName,it) into cdSpecif cdSpec is empty thenfail 3,"goToBtnCard","Missing card",cdName,trueexit goToBtnCardend if--goToCard cdSpec,"iris open fast",trueend goToBtnCardon goToFldCard bgName,stName-- USAGE: Public; PROGRAMMER: imp; DATE: 21.9.1990;---- PURPOSE: To go to the card named by the target field;---- PARAMS: bgName = name of the background-- stName = name of the stack (optional);--put line 1 of target into cdNameif cdName is empty then exit goToFldCard--get objectSpec("","","","","bg",bgName,stName)put cardNamed(cdName,it) into cdSpecif cdSpec is empty thenfail 3,"goToFldCard","Missing card",cdName,trueexit goToFldCardend if--goToCard cdSpec,"iris open fast",trueend goToFldCardon mouseWithinButton cursorName-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To change the cursor when the mouse is within buttons;--get mouseUpLocked()--if cursorName is emptythen put "Control" into cursorName--useCursor cursorNameend mouseWithinButtonon mouseLeaveButton-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To change the cursor when the mouse leaves buttons;--set cursor to handend mouseLeaveButtonon mouseWithinText cursorName-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To change the cursor when the mouse is within fields;--get mouseUpLocked()--if the style of the target contains "scrolling" thenif the mouseH > the right of the target - 18then exit mouseWithinTextend if--if cursorName is emptythen put "Menu" into cursorName--useCursor cursorNameend mouseWithinTexton mouseLeaveText-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To change the cursor when the mouse leaves fields;--set cursor to handend mouseLeaveTexton scrollTogether-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: Set the scrolls of the given fields to scroll of the-- target field. The field type is supposed to be the as the-- type of the target;---- PARAMS: Names of fields on the current card to be scrolled;--put the scroll of the target into setValueput HCobjectType(the target) into fldTyperepeat with i = 1 to the paramCountget objectSpec(fldType,param(i))set the scroll of it to setValueend repeatend scrollTogetheron goToNext-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To go to the next card;--visual effect wipe left fastgo to next card of this bgend goToNexton goToPrevious-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To go to the previous card;--visual effect wipe right fastgo to previous cd of this bgend goToPreviouson goToFirst-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To go to the first card;--visual effect wipe right fast to blackgo to first card of this bgend goToFirston goToLast-- USAGE: Public; PROGRAMMER: imp; DATE: 4.9.1990;---- PURPOSE: To go to the last card;--visual effect wipe left fast to blackgo to last card of this bgend goToLaston checkBackupCards-- USAGE: Public; PROGRAMMER: imp; DATE 9.11.1990;---- PURPOSE: To backup the cards of the stack;--setError--ask file "Backup file:"put it into fNameif fName is empty then exit checkBackupCards--set cursor to watch--put "" into buSpecrepeat with i = 1 to the number of bkgndsset cursor to busy--send "backupSpec" to bg iget the resultif it is empty then next repeat--put return & it after buSpecend repeat--if buSpec is not empty thenput the name of this stack into line 1 of buSpecput return & "end stack" after buSpec--backupStack fName,buSpecif error() thenfail 3,"checkBackupCards","Backup cards failed","",trueexit checkBackupCardsend ifend ifend checkBackupCardson checkRestoreCards-- USAGE: Public; PROGRAMMER: imp; DATE 9.11.1990;---- PURPOSE: To restore the cards of the stack;--answer file "Backup file:" of type "TEXT"put it into fNameif fName is empty then exit checkRestoreCards--set cursor to watch--put "" into buSpecrepeat with i = 1 to the number of bkgndsset cursor to busy--send "backupSpec" to bg iget the resultif it is empty then next repeat--put return & it after buSpecend repeat--if buSpec is not empty thenput the name of this stack into line 1 of buSpecput return & "end stack" after buSpecrestoreStack fName,buSpecif error() thenfail 3,"checkRestoreCards","Restore cards failed","",trueexit checkRestoreCardsend ifend ifend checkRestoreCardson backupSpec-- USAGE: Public; PROGRAMMER: imp; DATE 15.11.1990;---- PURPOSE: Dummy backupSpec;--return emptyend backupSpec</script>
</part>
<part>
<id>28</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System messages</name>
<script>-- System messages script---- ©1990 by Ilkka Priha-- Tiihonen Software company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field Name"--get cd fld fldNameput line 1 of it into fld "Text"--put line 2 of it into fld "Line 1" -- options--put line 3 of it into fld "Par 1" -- timeoutput line 4 of it into fld "Par 2" -- locationput line 5 of it into fld "Par 3" -- positionput line 6 of it into fld "Par 4" -- titleput line 7 of it into fld "Par 5" -- DLOGend ifend showSystemFieldon textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To update the message definition;--put fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Accept button:" with itif it is empty then exit line1Clickedend if--put it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon par1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend if--put it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend if--put it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend if--put it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend if--put it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend if--put it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par5Clickedon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To demonstrate the option facility;--put fld "Field Name" into fldNameif fldName is not emptythen SYSshowMessage fldName,"<parameter>"end tryMouseUp</script>
</part>
<part>
<id>29</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Error externals</name>
<script>-- External error routines---- ©1990 by Ilkka Priha-- All rights reservedon fail eCat,eRoutine,eMsg,ePar,report-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To invoke run-time errors in HyperTalk scripts. It is-- used both for informing the user about error conditions and for-- maintaining an error log about internal errors;---- PARAMS: eCat = error category:-- 1 = notice (minor problems)-- 2 = warning (some problems during the task)-- 3 = error (the task was cancelled)-- 4 = fatal (the execution must be terminated)-- eRoutine = name of the caller routine-- eMsg = name of the error message-- ePar = optional parameter to be reported-- report = if true, inform the user ("System errors" card);---- NOTE: See "error()";end failfunction error-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To return true, if the current error category is >= 3,-- otherwise false. It should be called after every calls to XCmds-- and HyperTalk routines using this error management system to get-- information about the success of the operation;---- RESULT: True, if the category >= 3, otherwise false;---- NOTE: See "error()" with other parameters also;end errorfunction error info,userError-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To return information about the latest run time error-- or about the error management;---- PARAMS: info = 1) either information about the error:-- category, description, type, code, routine,-- 2) or information about the error management:-- logFile, flags, maxLog-- userError = if true, then return information about-- the latest user error in alternative 1),-- otherwise about the latest system error-- (optional, default is false);---- RESULT: The requested information;---- NOTE: See "error()" with other parameters also;end erroron setError-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To clear (internally) a run-time error;---- NOTE: See "setError" with other parameters also;end setErroron setError info,parameter-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1989;---- PURPOSE: To set the specified error management information;---- PARAMS: info = information to set:-- logFile = change the spec of the error log folder-- to the value of the parameter-- flags = change the error log flags to the value-- of the parameter-- maxLog = change the max number of error logs-- to store to the value of the parameter-- parameter = parameter to information;---- NOTE: See "setError" with other parameters also;end setError function newError eCat,eDescr,eType,eCode,eRoutine,userError-- USAGE: Public; PROGRAMMER: imp; DATE: 6.9.1990;---- PURPOSE: To invoke (internally) a run-time error;---- PARAMS: eCat = error category: 1 = notice-- 2 = warning-- 3 = error-- 4 = fatal-- eDecr = description of the error-- eType = type of the error: -1 = OS error-- 0 = HyperTalk error-- 1 = XCmd error-- eCode = depends on error type-- eRoutine = routine which invoked the error-- userError = if true, then invoke a user error (optional);---- RESULT: True, if the category >= 3, otherwise false;---- NOTE: See "fail";end newError</script>
</part>
<part>
<id>39</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>0</top>
<right>1</right>
<bottom>1</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>System menubars</name>
<script>-- System menubars script---- ©1990 by Ilkka Priha-- Tiihonen Software Company Ltd, Finland-- All rights reservedon showSystemField fldName-- USAGE: Public; PROGRAMMER: imp; DATE: 13.9.1990;---- PURPOSE: To show a system field;---- PARAMS: fldName = name of the field;--send "clearParameterFields" to the target--if there is a cd fld fldName thenput fldName into fld "Field Name"--get cd fld fldNameput line 1 of it into fld "Line 1" -- titleput line 2 to 3 of it into fld "Text" -- menusend ifend showSystemFieldon textClicked-- USAGE: Public; PROGRAMMER: imp; DATE: 13.9.1990;---- PURPOSE: To update the message definition;--put fld "Field Name" into fldNameif fldName is not empty thenget line 1 to 2 of targetput it into line 2 to 3 of cd fld fldNameend ifend textClickedon line1Clicked-- USAGE: Public; PROGRAMMER: imp; DATE: 13.9.1990;---- PURPOSE: To change the parameter field;--put fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Menu title:" with itif it is empty then exit line1Clickedend if--put it into the targetput it into line 1 of cd fld fldNamecloseFieldend ifend line1Clickedon tryMouseUp-- USAGE: Public; PROGRAMMER: imp; DATE: 13.9.1990;---- PURPOSE: To demonstrate the menu facility;--put fld "Field Name" into fldNameif fldName is not emptythen SYScreateMenu fldNameend tryMouseUp</script>
</part>
<part>
<id>40</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>312</left>
<top>53</top>
<right>357</right>
<bottom>70</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<name>Clear</name>
<script>on mouseUpsend "clearSystemScripts" to this cdend mouseUp</script>
<text>The scripts card maintains the scripts of the stack.The scripts are maintained in the scripts of the system fields. The target object(s) are defined in the "Text" field.The scripts are copied to the target object(s) by clicking at the "Update" button. During copying, all comments are removed.</text>
</content>
<name>System scripts</name>
<script>-- script "System scripts"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field name"get cd fld fldNameput it into fld "Text"if the hilite of bg btn "Edit"then edit script of cd fld fldNameend ifend showSystemFieldon deleteSysField fldNameset cursor to watchif value("there is a cd fld fldName of" && the target) thenput value("cd fld fldName of" && the target) into objectsrepeat with i = 1 to the number of lines in objectsput line i of objects into objectif object is not empty thenif not objectExists(object) thenfail 3,"deleteSysField","Missing object",objectexit deleteSysFieldend ifput "-"&"- script" && quote & fldName & quote into startLineput "-"&"- end script" && quote & fldName & quote into endLineput the script of object into wholeScriptput offset(startLine,wholeScript) into c1if c1 > 0 thenput offset(endLine,wholeScript) into c2if c2 < c1 thenfail 3,"deleteSysField","Syntax error in script",objectexit deleteSysFieldend ifif c1 = 1 thendelete char c1 to c2 + the number of chars ¬in endLine of wholeScriptelsedelete char c1 - 1 to c2 + the number of chars ¬in endLine - 1 of wholeScriptend ifset script of object to wholeScriptend ifend ifend repeatend ifpass deleteSysFieldend deleteSysFieldon renameSysField fldName,newNameset cursor to watchif value("there is a cd fld fldName of" && the target) thenput value("cd fld fldName of" && the target) into objectsrepeat with i = 1 to the number of lines in objectsput line i of objects into objectif object is not empty thenif not objectExists(object) thenfail 3,"renameSysField","Missing object",objectexit renameSysFieldend ifput "-"&"- script" && quote & fldName & quote into startLineput "-"&"- end script" && quote & fldName & quote into endLineput the script of object into wholeScriptput offset(startLine,wholeScript) into c1if c1 > 0 thenput the number of chars in startLine - 1 into nput "-"&"- script" && quote & newName & quote into startLineput startLine into char c1 to c1 + n of wholeScriptput offset(endLine,wholeScript) into c2if c2 < c1 thenfail 3,"renameSysField","Syntax error in script",objectexit renameSysFieldend ifput the number of chars in endLine - 1 into nput "-"&"- end script" && quote & newName & quote into endLineput endLine into char c2 to c2 + n of wholeScriptset script of object to wholeScriptend ifend ifend repeatend ifpass renameSysFieldend renameSysFieldon updateSystemScriptssetErroranswer "Update the script?" with "OK" or "Cancel"if it is not "OK" then exit updateSystemScriptsif the hilite of bg btn "All fields" thenput empty into fldNameelseput fld "Field name" into fldNameif fldName is empty thenfail 3,"updateSystemScripts","Missing field","",trueexit updateSystemScriptsend ifend ifsend "updateSysScripts fldName" to the targetif error() thenfail 3,"updateSystemScripts","Update failed","",trueexit updateSystemScriptsend ifend updateSystemScriptson updateSysScripts fldNamesetErrorset cursor to watchget accessOtherCard(the target)if error() then exit updateSysScriptsif fldName is empty thenput 1 into jput the number of cd flds into nelse if there is a cd fld fldName thenput the number of cd fld fldName into jput j into nelseput 1 into jput 0 into nend ifrepeat with i = j to nset cursor to busyput cd fld i into objectsrepeat with k = 1 to the number of lines in objectsset cursor to busyput line k of objects into objectif object is not empty thenif not objectExists(object) thenfail 3,"updateSysScripts","Missing object",objectexit updateSysScriptsend ifput the short name of cd fld i into scriptNameput "-"&"- script" && quote & scriptName & quote into startLineput "-"&"- end script" && quote & scriptName & quote into endLineput the script of cd fld i into objectScriptput removeComments(objectScript) into objectScriptput removeEmptyLines(objectScript) into objectScriptif objectScript is not empty thenput startLine & return before objectScriptput return & endLine after objectScriptend ifput the script of object into wholeScriptput offset(startLine,wholeScript) into c1if c1 > 0 thenput offset(endLine,wholeScript) into c2if c2 < c1 thenfail 3,"updateSysScripts","Syntax error in script",objectexit updateSysScriptsend ifif c1 = 1 thendelete char c1 to c2 + the number of chars ¬in endLine of wholeScriptelsedelete char c1 - 1 to c2 + the number of chars ¬in endLine - 1 of wholeScriptend ifend ifif wholeScript is empty thenput objectScript into wholeScriptelse if objectScript is not empty thenput objectScript & return before wholeScriptend ifset script of object to wholeScriptend ifend repeatend repeatreturnFromOtherCardend updateSysScriptson clearSystemScriptssetErroranswer "Clear the scripts of this stack?" with ¬"Include parts" or "Exclude parts" or "Cancel"if it is "Cancel" then exit clearSystemScriptsif it is "Include parts"then put true into partsAlsoelse put false into partsAlsosend "clearSysScripts partsAlso" to the targetif error() thenfail 3,"clearSystemScripts","Clear failed","",trueexit clearSystemScriptsend ifend clearSystemScriptson clearSysScripts partsAlsosetErrorset cursor to watchput the short id of this bg into systemBgput the id of this cd into currentCdlock screenset lockMessages to trueset lockRecent to trueset script of this stack to emptyrepeat with i = 1 to the number of bkgndsset cursor to busyif the short id of bg i is systemBg then next repeatgo to bg iif the result is not empty thengo to currentCdunlockScreenset lockMessages to falseset lockRecent to falsefail 3,"clearSysScripts","Problem in bkgnd",iexit clearSysScriptsend ifset script of this bg to emptyif partsAlso is true thenrepeat with j = 1 to the number of bg fldsset cursor to busyset script of bg fld j to emptyend repeatrepeat with j = 1 to the number of bg btnsset cursor to busyset script of bg btn j to emptyend repeatend ifrepeat with j = 1 to the number of cds in this bgset cursor to busyset script of cd j of this bg to emptyend repeatend repeatgo to currentCdunlock screenset lockMessages to falseset lockRecent to falseend clearSysScripts-- end script "System scripts"</script>
</card>
card_4283.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The notes card contains tools for installing notifications. The text of the notification is defined in the "Text" field. The name or id of a small icon to rotate with the symbol in the application menu is defined in the "SICN" field. The name or id of the sound resource to play when opening the notification is defined in the "snd" field.The utility can be used by calling the "SYSinstallNote" message.</text>
</content>
<content>
<layer>background</layer>
<id>54</id>
<text>System notes</text>
</content>
<content>
<layer>background</layer>
<id>58</id>
<text>05.02.1991</text>
</content>
<content>
<layer>background</layer>
<id>59</id>
<text>13:20:36</text>
</content>
<content>
<layer>background</layer>
<id>55</id>
<text>English</text>
</content>
<content>
<layer>background</layer>
<id>51</id>
<text>Example</text>
</content>
<content>
<layer>card</layer>
<id>24</id>
<text>Notifications has to be removed explicitly from the queu with "SYSremoveNote"!128-1</text>
</content>
<name>System notes</name>
<script>-- script "System notes"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field name"get cd fld fldNameput line 1 of it into fld "Text"put line 2 of it into fld "Line 1"put line 3 of it into fld "Line 2"end ifend showSystemFieldon textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget targetask "'SICN' name or id:" with itif it is empty then exit line1Clickedend ifput it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget targetask "'snd' name or id:" with itif it is empty then exit line2Clickedend ifput it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clicked-- end script "System notes"-- System noteson showSystemField fldNamesend "clearParameterFields" to the targetput fldName into fld "Field name"get cd fld fldNameput line 1 of it into fld "Text"put line 2 of it into fld "Line 1"put line 3 of it into fld "Line 2"end showSystemFieldon textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget targetask "'SICN' name or id:" with itif it is empty then exit line1Clickedend ifput line 1 of it into the targetput line 1 of it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clickedput get fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget targetask "'snd' name or id:" with itif it is empty then exit line2Clickedend ifput line 1 of it into the targetput line 1 of it into line 3 of cd fld fldNamecloseFieldend ifend line2Clicked-- end script</script>
</card>
card_2218.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The translations card contains tools for translating phrases to the current user language. The phrases of one list are defined in the "Text" field. The phrases of the specific language are in the corresponding lines of the same field preceeded by "=". The current user language is specified in the "Language" field.The utility can be used by calling the "SYStranslate" function.</text>
</content>
<content>
<layer>background</layer>
<id>51</id>
<text>Example</text>
</content>
<content>
<layer>background</layer>
<id>54</id>
<text>System translations</text>
</content>
<content>
<layer>background</layer>
<id>58</id>
<text>05.02.1991</text>
</content>
<content>
<layer>background</layer>
<id>59</id>
<text>13:16:48</text>
</content>
<content>
<layer>background</layer>
<id>55</id>
<text>English</text>
</content>
<name>System translations</name>
<script></script>
</card>
card_5319.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The lists card contains tools for list based selections. The list is given as a parameter. The appearance of the list on the screen is defined in a DLOG resource. The prompt for the list is written to the "Text" field. The prompt can contain one "&" spesification which is replaced with an optional parameter in the call of the utility. The "Selection" field defines the type of selection. "one" is for selection of a single item, "con" is for selection of several continuous items and "dis" is for selection of several items in any order.The maximum length of one list item can be specified on the "Max length" field. If the length is longer, the line is cut to the max length before displaying it.The "Timeout" contains an optional timeout specification (in seconds) for the user response.The "Location" and "Position" fields contain the location of the dialog window in the card coordinate system. If undefined then the window is centered according to the card window.The "Title" field can contain a title for the dialog (not valid with the default dialog).The "DLOG" field can contain an alternative dialog id.The labels of the "Ok" and "Cancel" buttons are defined in the corresponding fields. They are common for all questions.The utility can be used by calling the "SYSopenList" function.</text>
</content>
<content>
<layer>background</layer>
<id>54</id>
<text>System lists</text>
</content>
<content>
<layer>background</layer>
<id>58</id>
<text>05.02.1991</text>
</content>
<content>
<layer>background</layer>
<id>59</id>
<text>13:15:54</text>
</content>
<content>
<layer>background</layer>
<id>55</id>
<text>English</text>
</content>
<content>
<layer>background</layer>
<id>71</id>
<text>Select</text>
</content>
<content>
<layer>background</layer>
<id>72</id>
<text>Cancel</text>
</content>
<content>
<layer>background</layer>
<id>51</id>
<text>Example</text>
</content>
<content>
<layer>card</layer>
<id>23</id>
<text>Select one:one1015</text>
</content>
<name>System lists</name>
<script>-- script "System lists"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field Name"get cd fld fldNameput line 1 of it into fld "Text"put line 2 of it into fld "Line 1"put line 3 of it into fld "Line 2"put line 4 of it into fld "Par 1"put line 5 of it into fld "Par 2"put line 6 of it into fld "Par 2"put line 7 of it into fld "Par 5"put line 8 of it into fld "Par 6"end ifend showSystemFieldon clearParameterFieldsput "" into fld "Field Name"put "" into fld "Text"repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeatrepeat with i = 1 to 6put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Selection (one, con or dis):" with itif it is empty then exit line1Clickedend ifput it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget line 2 of targetask "Max length:" with itif it is empty then exit line2Clickedend ifput it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clickedon par1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend ifput it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend ifput it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend ifput it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend ifput it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend ifput it into the targetput it into line 8 of cd fld fldNamecloseFieldend ifend par5Clickedon par7Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par7Clickedget emptyelseget line 1 of targetask "Text of the 'Select' button:" with itif it is empty then exit par7Clickedend ifput it into the targetcloseFieldend par7Clickedon par8Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par8Clickedget emptyelseget line 1 of targetask "Text of the 'Cancel' button:" with itif it is empty then exit par8Clickedend ifput it into the targetcloseFieldend par8Clickedon tryMouseUpput fld "Field Name" into fldNameif fldName is not empty thenput "123456789012345678901234567890123456789012345678901234567890" ¬into listItemsrepeat with i = 2 to 20put "Item"&& i into line i of listItemsend repeatget SYSopenList(fldName,listItems,empty,"<parameter>")put itend ifend tryMouseUp-- end script "System lists"</script>
</card>
card_3933.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The messages card contains tools for displaying messages to the user. The text of the message is written to the "Text" field. The text can contain one "&" spesification which is replaced with an optional parameter in the call of the utility. The text of the accept button is define in the corresponding field. The "Timeout" contains an optional timeout specification (in seconds) for the user response.The "Location" and "Position" fields contain the location of the dialog window in the card coordinate system. If undefined, then the window is centered according to the card window.The "Title" field can contain a title for the dialog.The "DLOG" field can contain an alternative dialog id.The utility can be used by calling the "SYSshowMessage" message.</text>
</content>
<content>
<layer>background</layer>
<id>51</id>
<text>Example</text>
</content>
<content>
<layer>card</layer>
<id>6</id>
<text>This one can be moved!Continue15*** ***</text>
</content>
<name>System messages</name>
<script>-- script "System messages"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field Name"get cd fld fldNameput line 1 of it into fld "Text"put line 2 of it into fld "Line 1"put line 3 of it into fld "Par 1"put line 4 of it into fld "Par 2"put line 5 of it into fld "Par 3"put line 6 of it into fld "Par 4"put line 7 of it into fld "Par 5"end ifend showSystemFieldon textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Accept button:" with itif it is empty then exit line1Clickedend ifput it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon par1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend ifput it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend ifput it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend ifput it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend ifput it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend ifput it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par5Clickedon tryMouseUpput fld "Field Name" into fldNameif fldName is not emptythen SYSshowMessage fldName,"<parameter>"end tryMouseUp-- end script "System messages"</script>
</card>
card_9568.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The options card contains tools for asking questions from the user with a set of predefined answers. The text of the question is written to the "Text" field. The text can contain one "&" spesification which is replaced with an optional parameter in the call of the utility. The options from which the user can choose are in the "Options" field separated by commas. The corresponding alternatives returned to the caller of this utility are in the "Alternatives" field.The "Timeout" contains an optional timeout specification (in seconds) for the user response.The "Location" and "Position" fields contain the location of the dialog window in the card coordinate system. If undefined, then the window is centered according to the card window.The "Title" field can contain a title for the dialog (not valid with the default dialog).The "DLOG" field can contain an alternative dialog id.The utility can be used by calling the "SYSopenOption" function.</text>
</content>
<content>
<layer>background</layer>
<id>54</id>
<text>System options</text>
</content>
<content>
<layer>background</layer>
<id>58</id>
<text>05.02.1991</text>
</content>
<content>
<layer>background</layer>
<id>59</id>
<text>13:12:28</text>
</content>
<content>
<layer>background</layer>
<id>55</id>
<text>English</text>
</content>
<content>
<layer>background</layer>
<id>51</id>
<text>Example</text>
</content>
<content>
<layer>card</layer>
<id>29</id>
<text>What?Cancel,No,Yes15</text>
</content>
<name>System options</name>
<script>-- script "System options"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field Name"get cd fld fldNameput line 1 of it into fld "Text"put line 2 of it into fld "Line 1"put line 3 of it into fld "Line 2"put line 4 of it into fld "Par 1"put line 5 of it into fld "Par 2"put line 6 of it into fld "Par 3"put line 7 of it into fld "Par 4"put line 8 of it into fld "Par 5"end ifend showSystemFieldon textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "User options:" with itif it is empty then exit line1Clickedend ifput it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget line 1 of targetask "System alternatives:" with itif it is empty then exit line2Clickedend ifput it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clickedon par1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend ifput it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend ifput it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend ifput it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend ifput it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend ifput it into the targetput it into line 8 of cd fld fldNamecloseFieldend ifend par5Clickedon tryMouseUpput fld "Field Name" into fldNameif fldName is not empty thenget SYSopenOption(fldName,"<parameter>")put itend ifend tryMouseUp-- end script "System options"</script>
</card>
card_11380.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The questions card contains tools for asking questions from the user. The text of the question is written to the "Text" field. The text can contain one "&" spesification which is replaced with an optional parameter in the call of the utility. The default answer is defined in the "Answer" field.The maximum length of the answer can be specified on the "Max length" field. If the length is longer, it is truncated to the length.The "Timeout" contains an optional timeout specification (in seconds) for the user response.The "Location" and "Position" fields contain the location of the dialog window in the card coordinate system. If undefined, then the window is centered according to the card window.The "Title" field can contain a title for the dialog (not valid with the default dialog).The "DLOG" field can contain an alternative dialog id.The labels of the "Ok" and "Cancel" buttons are defined in the corresponding fields. They are common for all questions.The utility can be used by calling the "SYSopenQuestion" function.</text>
</content>
<content>
<layer>background</layer>
<id>54</id>
<text>System questions</text>
</content>
<content>
<layer>background</layer>
<id>58</id>
<text>05.02.1991</text>
</content>
<content>
<layer>background</layer>
<id>59</id>
<text>13:12:03</text>
</content>
<content>
<layer>background</layer>
<id>55</id>
<text>English</text>
</content>
<content>
<layer>background</layer>
<id>71</id>
<text>OK</text>
</content>
<content>
<layer>background</layer>
<id>72</id>
<text>Cancel</text>
</content>
<content>
<layer>background</layer>
<id>51</id>
<text>Example</text>
</content>
<content>
<layer>card</layer>
<id>36</id>
<text>How are you?Fine, thanks150,0topLeft</text>
</content>
<name>System questions</name>
<script>-- script "System questions"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field Name"get cd fld fldNameput line 1 of it into fld "Text"put line 2 of it into fld "Line 1"put line 3 of it into fld "Line 2"put line 4 of it into fld "Par 1"put line 5 of it into fld "Par 2"put line 6 of it into fld "Par 3"put line 7 of it into fld "Par 4"put line 8 of it into fld "Par 5"end ifend showSystemFieldon clearParameterFieldsput "" into fld "Field Name"put "" into fld "Text"repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeatrepeat with i = 1 to 6put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 of targetput it into line 1 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Default answer:" with itif it is empty then exit line1Clickedend ifput it into the targetput it into line 2 of cd fld fldNamecloseFieldend ifend line1Clickedon line2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line2Clickedget emptyelseget line 1 of targetask "Max length:" with itif it is empty then exit line2Clickedend ifput it into the targetput it into line 3 of cd fld fldNamecloseFieldend ifend line2Clickedon par1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Timeout:" with itif it is empty then exit par1Clickedend ifput it into the targetput it into line 4 of cd fld fldNamecloseFieldend ifend par1Clickedon par2Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Location (x,y):" with itif it is empty then exit par2Clickedend ifput it into the targetput it into line 5 of cd fld fldNamecloseFieldend ifend par2Clickedon par3Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Relative position:" with itif it is empty then exit par3Clickedend ifput it into the targetput it into line 6 of cd fld fldNamecloseFieldend ifend par3Clickedon par4Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Title:" with itif it is empty then exit par4Clickedend ifput it into the targetput it into line 7 of cd fld fldNamecloseFieldend ifend par4Clickedon par5Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par5Clickedget emptyelseget line 1 of targetask "DLOG id:" with itif it is empty then exit par5Clickedend ifput it into the targetput it into line 8 of cd fld fldNamecloseFieldend ifend par5Clickedon par7Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par7Clickedget emptyelseget line 1 of targetask "Text of the 'Ok' button:" with itif it is empty then exit par7Clickedend ifput it into the targetcloseFieldend par7Clickedon par8Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par8Clickedget emptyelseget line 1 of targetask "Text of the 'Cancel' button:" with itif it is empty then exit par8Clickedend ifput it into the targetcloseFieldend par8Clickedon tryMouseUpput fld "Field Name" into fldNameif fldName is not empty thenget SYSopenQuestion(fldName,empty,"<parameter>")put itend ifend tryMouseUp-- end script "System questions"</script>
</card>
card_11244.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The errors card contains tools for error management in HyperCard.The text of an error message is written to the "Text" field. The text can contain one "&" spesification which is replaced with an optional parameter in the call of the utility. The text of the cancel options are defined in the corresponding fields.The utility can be called with the "fail" message.To change the appearance of the dialog box, edit the "Ask" DLOG and DITL resources.</text>
<script>-- script "System errors"on clearParameterFieldsput "" into fld "Field Name"put "" into fld "Text"repeat with i = 1 to 4put "Line" && i into fldNameput "" into fld fldNameend repeatrepeat with i = 5 to 8put "Par" && i into fldNameput "" into fld fldNameend repeatend clearParameterFieldson textClickedput fld "Field Name" into fldNameif fldName is not empty thenget targetput it into cd fld fldNameend ifend textClickedon par1Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par1Clickedget emptyelseget line 1 of targetask "Notice message:" with itif it is empty then exit par1Clickedend ifput it into the targetcloseFieldend par1Clickedon par2Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par2Clickedget emptyelseget line 1 of targetask "Warning message:" with itif it is empty then exit par2Clickedend ifput it into the targetcloseFieldend par2Clickedon par3Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par3Clickedget emptyelseget line 1 of targetask "Error message:" with itif it is empty then exit par3Clickedend ifput it into the targetcloseFieldend par3Clickedon par4Clickedif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit par4Clickedget emptyelseget line 1 of targetask "Fatal message:" with itif it is empty then exit par4Clickedend ifput it into the targetcloseFieldend par4Clickedon tryMouseUpput fld "Field Name" into fldNameif fldName is not empty thenfail 3,"tryMouseUp",fldName,"<parameter>",trueend ifend tryMouseUp-- end script "System errors"</script>
</card>
card_2739.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The menubars card can be used for installing new menus to the menubar.The name of the menu is defined in the title field.The items in the menu are written to the first line of the "Text" field separated by semi-colons (remember to add an explicit RETURN after each line). The following meta characters are supported with the items: ! followed by a character marks the item < followed by B,I,U,O,S sets the style ( disables the item - inserts a grayed out lineThe corresponding alternatives returned to the caller of this utility are on the 2nd line separated by commas.The utility can be used by calling the "SYScreateMenu" message.</text>
<script>-- script "System menubars"on showSystemField fldNamesend "clearParameterFields" to the targetif there is a cd fld fldName thenput fldName into fld "Field Name"get cd fld fldNameput line 1 of it into fld "Line 1"put line 2 to 3 of it into fld "Text"end ifend showSystemFieldon textClickedput fld "Field Name" into fldNameif fldName is not empty thenget line 1 to 2 of targetput it into line 2 to 3 of cd fld fldNameend ifend textClickedon line1Clickedput fld "Field Name" into fldNameif fldName is not empty thenif the optionKey is "down" thenanswer "Clear field?" with "Ok" or "Cancel"if it is "Cancel" then exit line1Clickedget emptyelseget line 1 of targetask "Menu title:" with itif it is empty then exit line1Clickedend ifput it into the targetput it into line 1 of cd fld fldNamecloseFieldend ifend line1Clickedon tryMouseUpput fld "Field Name" into fldNameif fldName is not emptythen SYScreateMenu fldNameend tryMouseUp-- end script "System menubars"</script>
</card>
card_10760.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>The menus card contains tools for managing pop-up menus.The items in the menu are written to the first line of the "Text" field separated by semi-colons (remember to add an explicit RETURN after each line). The following meta characters are supported with the items: ! followed by a character marks the item < followed by B,I,U,O,S sets the style / followed by a character attaches a submenu ( disables the item - inserts a grayed out lineThe corresponding alternatives returned to the caller of this utility are on the 2nd line separated by commas.The default alternative can be specified on the 3rd line.Hierarchial submenus can be defined in the subsequent lines. The definition of a submenu includes two lines. The first one has a reference to the character, which attaches the submenu to a specific item in some other menu, separated by a colon from the user items of the submenu. The user items are defined in the same way as in the main menu. The second line consists of the corresponding alternatives returned to the caller.The utility can be used by calling the "SYSpopMenu" function, or by using the "menuMouseDown" and "subMenuMouseDown" messages.</text>
<text>System Cards contain application independent utilities for system maintenance and interaction with the user. Such utilities are included as pop-up menus, menubar menus, error management, questions, options, messages, lists, notifications, translations and script and resource maintenance. To go to a card of a specific utility click at the corresponding line of the "Index" field.To use the utilities, you have to install them into your stack. Do this by clicking at the "Install" button. It can also be used for updating the scripts of already installed System Cards.New items on a specific card are created by clicking at the "New" button. Existing items can be displayed by clicking at their name in the "Index" field. Items can be deleted by clicking at their name with the option key down.The current item can be tested by clicking at the "Try" button.</text>
<script>-- script "System index"on makeIndexput "" into indexListrepeat with i = 2 to the number of cds in bg "System Card"put the short name of cd i of bg "System Card" ¬into line i - 1 of indexListend repeatput indexList into fld "Index"end makeIndexon indexFldMousedget value(the clickLine)if it is not empty thenvisual effect iris open fastgo to card itend ifend indexFldMousedon clearParameterFieldsend clearParameterFieldson createSystemFieldend createSystemFieldon showSystemFieldend showSystemFieldon deleteSystemFieldend deleteSystemFieldon renameSystemFieldend renameSystemFieldon backupSysFields fileSpecset cursor to watchput the name of this stack into line 1 of specput "bkgnd" && quote & "System card" & quote into line 2 of specput "card fields" into line 3 of specput "end bkgnd" into line 4 of specput "end stack" into line 5 of specbackupStack fileSpec,specend backupSysFieldson restoreSysFields fileSpecset cursor to watchput the name of this stack into line 1 of specput "bkgnd" && quote & "System card" & quote into line 2 of specput "card fields" into line 3 of specput "end bkgnd" into line 4 of specput "end stack" into line 5 of specrestoreStack fileSpec,specend restoreSysFieldson installSysStructure sName,recursionsetErrorif recursion is true then pass installSysStructureset cursor to watchif sName is empty thenfail 3,"installSysStructure","Missing stack"exit installSysStructureend ifput objectSpec("","","","","bg","System card",sName) into bgSpecif not objectExists(bgSpec) thensend "installSysCards sName,false" to the targetelseget accessOtherCard(the target)if error() then exit installSysStructureput the script of this bg into scriptTextset editBkgnd to trueput the tool into cToolput "Copy Field" into cOperput "Paste Field" into pOperput "Clear Field" into dOperrepeat with i = 0 to the number of bg fldsset cursor to busyif i > 0 thenput the visible of bg fld i into dontHideshow bg fld iselect bg fld isend "doMenu cOper without dialog" to HyperCardif not dontHide then hide bg fld iend ifget accessOtherCard(bgSpec)if error() thenchoose cToolset editBkgnd to falsereturnFromOtherCardexit installSysStructureend ifif i > 0 thensend "doMenu pOper without dialog" to HyperCardif not dontHide thenhide last bg fldend ifelseset script of this bg to scriptTextrepeat with j = the number of bg flds down to 1show bg fld jselect bg fld jsend "doMenu dOper without dialog" to HyperCardend repeatend ifreturnFromOtherCardend repeatput "Copy Button" into cOperput "Paste Button" into pOperput "Clear Button" into dOperrepeat with i = 0 to the number of bg btnsset cursor to busyif i > 0 thenput the visible of bg btn i into dontHideshow bg btn iselect bg btn isend "doMenu cOper without dialog" to HyperCardif not dontHide then hide bg btn iend ifget accessOtherCard(bgSpec)if error() thenchoose cToolset editBkgnd to falsereturnFromOtherCardexit installSysStructureend ifif i > 0 thensend "doMenu pOper without dialog" to HyperCardif not dontHide thenhide last bg btnend ifelserepeat with j = the number of bg btns down to 1show bg btn jselect bg btn jsend "doMenu dOper without dialog" to HyperCardend repeatend ifreturnFromOtherCardend repeatchoose cToolset editBkgnd to falsereturnFromOtherCardrepeat with i = 1 to the number of cds in bg "System card"put objectSpec("","","cd",i,"bg","System card") into cdSpecsend "installSysStructure sName,true" to cdSpecif error() then exit installSysStructureend repeatend ifend installSysStructureon installSysScripts sName,recursionsetErrorif recursion is true then pass installSysScriptsset cursor to watchif sName is empty thenfail 3,"installSysScripts","Missing stack"exit installSysScriptsend ifput objectSpec("","","","","bg","System card",sName) into bgSpecif not objectExists(bgSpec) thensend "installSysCards sName,false" to the targetelseget accessOtherCard(the target)if error() then exit installSysScriptsput the script of this bg into scriptTextrepeat with i = 0 to the number of bg fldsset cursor to busyif i > 0 thenput the script of bg fld i into partScriptend ifget accessOtherCard(bgSpec)if error() thenreturnFromOtherCardexit installSysScriptsend ifif i > 0 thenif there is a bg fld i thenset script of bg fld i to partScriptend ifelseset script of this bg to scriptTextend ifreturnFromOtherCardend repeatrepeat with i = 1 to the number of bg btnsset cursor to busyif i > 0 thenput the script of bg btn i into partScriptend ifget accessOtherCard(bgSpec)if error() thenreturnFromOtherCardexit installSysScriptsend ifif there is a bg btn i thenset script of bg btn i to partScriptend ifreturnFromOtherCardend repeatreturnFromOtherCardrepeat with i = 1 to the number of cds in bg "System card"put objectSpec("","","cd",i,"bg","System card") into cdSpecsend "installSysScripts sName,true" to cdSpecif error() then exit installSysScriptsend repeatend ifend installSysScriptson installSysFields sName,fldName,recursionsetErrorif recursion is true then pass installSysFieldsset cursor to watchif sName is empty thenfail 3,"installSysFields","Missing stack"exit installSysFieldsend ifput objectSpec("","","","","bg","System card",sName) into bgSpecif not objectExists(bgSpec) thensend "installSysCards sName,true" to the targetelserepeat with i = 1 to the number of cds in bg "System card"put objectSpec("","","cd",i,"bg","System card") into cdSpecsend "installSysFields sName,empty,true" to cdSpecif error() then exit installSysFieldsend repeatend ifend installSysFieldson installSysCards sName,installFieldssetErrorif sName is empty thenfail 3,"installSysFields","Missing stack"exit installSysCardsend ifput objectSpec("","","","","bg","System card") into bgSpecget accessOtherCard(bgSpec)if error() then exit installSysCardsput objectSpec("","","cd",1,"","",sName) into stackSpecput the tool into cToolput "Copy Card" into cOperput "Paste Card" into pOperput "Clear Field" into dOperrepeat with i = the number of cds in this bg down to 1set cursor to busygo to cd i of this bgsend "doMenu cOper without dialog" to HyperCardget accessOtherCard(stackSpec)if error() thenchoose cToolreturnFromOtherCardexit installSysCardsend ifsend "doMenu pOper without dialog" to HyperCardif installFields is not true thenrepeat with j = the number of cd flds down to 1show cd fld jselect cd fld jsend "doMenu dOper without dialog" to HyperCardend repeatend ifreturnFromOtherCardend repeatchoose cToolreturnFromOtherCardend installSysCards-- end script "System index"</script>
</card>
card_6515.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide the targetend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>0</left>
<top>305</top>
<right>38</right>
<bottom>342</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>3333</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Help</name>
<script>on mouseUpshow cd fld "Help"end mouseUp</script>
</part>
<content>
<layer>card</layer>
<id>1</id>
<text>The Círdan XCmd collection contains tools for managing HyperCard based applications. The tools support user interface management, script management and resource management of stack applications. The idea is to define user interface items, scripts and resources used by a specific stack in resource cards, from which they can accessed or distributed whenever needed. The resource based management of these items makes the development, version management, maintenance and distribution of stack applications easier.To use the resource cards in a specific stack they have to be copied to that stack. Also the resources of this stack has to be copied, or this stack has to be included in the stacks in use list. Each resource card has a short documentation of its use.The Círdan collection contains also several XCmds for general use. Because the size of only one stack would have been too large, the XCmds are divided into four separate stacks: "Cirdan Cards" contains resource cards and user interface XCmds, "Cirdan File XCmds" contains file, resource and serial port XCmds, "Cirdan Card XCmds" contains XCmds for accessing cards and stacks, "Cirdan Utility XCmds" contains misc. utility XCmds.To use all the features of the "Cirdan Cards" stack you have to copy the required resources to it.The shareware version of the Círdan XCmd collection can be used and distributed freely for non-commercial purposes. The copyright notice will be shown during the first call to any of the XCmds after start-up. This notice may not be removed.For further information or comments contact: Ilkka Priha Puistokuja 5-7 E 47 SF-02700 Kauniainen FINLAND</text>
</content>
<content>
<layer>background</layer>
<id>3</id>
<text>Cirdan Cards</text>
</content>
<name></name>
<script>on testput "otaniemi:faks 2.0:xcmdlib:stacks:y" into srcput "otaniemi:faks 2.0:xcmdlib:stacks:x" into trgresourcecopy src,trg,"XCMD","resourcecopy"--put fileInfo(trg)end test</script>